/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package managers;

import DAO.InformeDAO;
import JPA.JPAInformeDAO;
import domain.Entity.EntityInforme;
import java.util.List;

/**
 *
 * @author jorge
 */
public class InformeManager {
     
     private InformeDAO informe;
     private static InformeManager instance = null;
        
  	
        public static synchronized InformeManager getInstance(){
		if(instance == null){
			instance = new InformeManager();
			return instance;
		}
		else
			return instance;
	}
        
	
	private InformeManager(){
		this.informe =new JPAInformeDAO();
	}

        public void addInforme(EntityInforme ei){
    	 this.informe.anadirInforme(ei);
        }
        
        public List listarInformes(long dni){
    	 return this.informe.listarInformes(dni);
        }
        
        public void borrarInforme(long idInforme){
            this.informe.borrarInforme(idInforme);
        }

}
